package ua.edu.nuos.jeetraining2012.automator.core.vo.message;

import java.util.List;
import java.util.Vector;

/**
 * @author Timur Yarosh
 *         Date: 03.06.13
 *         Time: 23:24
 */
public class Message {
    public static enum Type { PRIVATE_MESSAGE, PUBLIC_MESSAGE }
    private List<BinaryData> binaryDatas;
    private String text;
    private String subject;

    public Message() {
        binaryDatas = new Vector<BinaryData>();
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public boolean appendBinaryData(BinaryData data) {
        return binaryDatas.add(data);
    }

    public boolean removeBinaryData(BinaryData data) {
        return binaryDatas.remove(data);
    }

    public BinaryData[] listBinaryData() {
        return binaryDatas.toArray(new BinaryData[]{});
    }
}
